package pl.edu.agh.som.distance;

public class ScalarDistance implements IDistanceFunction
{

    @Override
    public double evaluate(double[] vector1, double[] vector2)
    {
        int len = vector1.length;
        double sum = 0.0;
        for (int i = 0; i < len; i++)
        {
            sum += vector1[i] * vector2[i];
        }

        return sum;
    }
}
